

Type RenderWindow Extends BaseObject
	
rem
bbdoc: Adds a viewport to the rendering target.
about: A viewport is the rectangle into which rendering output is sent. This method adds a viewport 
to the render target, rendering from the supplied camera. The rest of the parameters are only required 
if you wish to add more than one viewport to a single rendering target. Note that size information 
passed to this method is passed as a parametric, i.e. it is relative rather than absolute. This is to 
allow viewports to automatically resize along with the target. 
<p><b>Parameters:</b></p>
<table cellpadding="4" cellspacing="4" border="0">
<tr><td><i>cam</i></td><td>The camera from which the viewport contents will be rendered (mandatory)</td></tr>
<tr><td><i>ZOrder</i></td><td>The relative order of the viewport with others on the target (allows overlapping viewports i.e. picture-in-picture). Higher ZOrders are on top of lower ones. The actual number is irrelevant, only the relative ZOrder matters (you can leave gaps in the numbering)</td></tr>
<tr><td><i>left</i></td><td>The relative position of the left of the viewport on the target, as a value between 0 and 1.</td></tr>
<tr><td><i>top</i></td><td>The relative position of the top of the viewport on the target, as a value between 0 and 1.</td></tr>
<tr><td><i>width</i></td><td>The relative width of the viewport on the target, as a value between 0 and 1.</td></tr>
<tr><td><i>height</i></td><td>The relative height of the viewport on the target, as a value between 0 and 1.</td></tr>

</table>
endrem
	Method addViewPort:Viewport(cam:Camera, zOrder:Int = 0, x:Float = 0.0, y:Float = 0.0, width:Float = 1.0, Height:Float = 1.0)
		Local vp:Viewport = New Viewport
		vp._ptr = o_addViewPort(Self._ptr, cam._ptr, zOrder, x, y, width, Height)
		vp._typ = ET_NO_ENTITY
		Return vp
	End Method
	
rem
bbdoc: Individual stats access - gets the average frames per second (FPS) since call to Root::startRendering. 
endrem
	Method getAverageFPS:Float()
		Return o_getAverageFPS(Self._ptr)
	End Method
	
rem
bbdoc: Individual stats access - gets the best frames per second (FPS) since call to Root::startRendering. 
endrem
	Method getBestFPS:Float()
		Return o_getBestFPS(Self._ptr)
	End Method
	
rem
bbdoc: Individual stats access - gets the best frame time. 
endrem
	Method getBestFrameTime:Float()
		Return o_getBestFrameTime(Self._ptr)
	End Method
	
rem
bbdoc: Individual stats access - gets the number of frames per second (FPS) based on the last frame rendered. 
endrem
	Method getLastFPS:Float()
		Return o_getLastFPS(Self._ptr)
	End Method
	
rem
bbdoc: Individual stats access - gets the worst frames per second (FPS) since call to Root::startRendering. 
endrem
	Method getWorstFPS:Float()
		Return o_getWorstFPS(Self._ptr)
	End Method
	
rem
bbdoc: Individual stats access - gets the worst frame time. 
endrem
	Method getWorstFrameTime:Float()
		return o_getWorstFrameTime(self._ptr)
	End Method
End Type